package com.xiaomiMall.mange.mapper;

import com.xiaomiMall.mange.domain.XiaoMiProd;
import com.xiaomiMall.mange.domain.XiaoMiProdDetail;
import com.xiaomiMall.mange.domain.vo.Order;
import com.xiaomiMall.mange.domain.vo.XiaoMiProdOrderVo;
import com.xiaomiMall.mange.vo.XiaoMiProdandDetailVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author codefish
 * @date 2021/11/2
 * @apinote
 */
//2021年11月14日09:57:36
@Mapper
public interface XiaoMiProdMapper {
    List<XiaoMiProd> getProdList(XiaoMiProd xiaoMiProd);

    List<XiaoMiProdDetail> getProdDetailList(XiaoMiProd xiaoMiProd);

    List getProdColor(@Param("uid") String uid, @Param("prodId") String prodId);

    List<XiaoMiProdandDetailVo> getProductList();

    boolean uploadProdPicture(@Param("prodPicture") String prodPicture, @Param("prodId") String prodId);

    Integer addProduct(XiaoMiProd xiaoMiProd);

    Integer addProductDetail(List<XiaoMiProdDetail> xiaoMiProdDetailList);

    int updateProduct(XiaoMiProd xiaoMiProd);

    int updateDetailProduct(XiaoMiProdDetail xiaoMiProdDetail);

    int changeProdStatus(@Param("prodId") String prodId, @Param("status") String status);

    List<XiaoMiProd> exportProduct(List<String> prodIds);

    List<XiaoMiProdOrderVo> getOrderData(Order prodOrder);

    List<HashMap<String, String>> getOrderSalesInfo();
}
